package club.sanmubird.springboot_mysqlAndMongodb.mysql.controller;

import club.sanmubird.springboot_mysqlAndMongodb.mysql.entity.User;
import club.sanmubird.springboot_mysqlAndMongodb.mysql.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: springboot_simpledb
 * @description: 测试
 * @author: sam
 * @create: 2018-07-18 01:19
 * @update: 2018-07-18 01:19
 * @update: Sam
 **/
@RestController
@RequestMapping("/user")
public class UserController {

	@Autowired
	private UserService userService;

	@RequestMapping("/getAllUsers")
	public String getAllUsers() {
		List<User> users = userService.getAllUsers();
		System.out.println(users.toString());
		return users.toString();
	}

}
